import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// let finalRoutes = [
//     {
//         path: '/dashboard2',
//         name: 'Dashboard2',
//         component: TabsView,
//         // component: (resolve) => require(['@/pages/test/test1'], resolve),
//         children: [
//             {
//                 path: '/test',
//                 name: 'test',
//                 component: (resolve) => require(['@/pages/test/test1'], resolve),
//                 meta: {
//                     name: "Test"
//                 }
//             },
//             {
//                 path: "/system/role",
//                 name: "role",
//                 component: (resolve) => require(['@/pages/system/system-role'], resolve),
//                 meta: {
//                     "icon": "dashboard",
//                     "pAuthorities": [{
//                         "permission": "*"
//                     }]
//                 }
//             }
//         ],
//         meta: {
//             icon: 'dashboard'
//         },
//     },
//
// ]

export default [
    {
        path: "/",
        name: "dash",
        component: 'TabsView',
        meta: {
            "icon": "dashboard",
            // "authority": {
            //     "permission": "*"
            // },
            "pAuthorities": [{
                "permission": "*"
            }]
        },
        children: [
            {
                path: "/test",
                name: "test",
                component: 'test/test1',
                meta: {
                    title: "测试页面",
                    "icon": "dashboard",
                    // "authority": {
                    //     "permission": "*"
                    // },
                    "pAuthorities": [{
                        "permission": "*"
                    }]
                },
            },
            {
                path: "/system",
                name: "system",
                component: "BlankView",
                meta: {
                    "icon": "dashboard",
                    "title": "系统管理",
                    "pAuthorities": [{
                        "permission": "*"
                    }]
                },
                children: [
                    {
                        path: "/system/role",
                        name: "role",
                        component: "system/system-role",
                        meta: {
                            title: "角色管理",
                            "icon": "dashboard",
                            "pAuthorities": [{
                                "permission": "*"
                            }]
                        }
                    },
                    {
                        path: "/system/menu",
                        name: "menu",
                        component: "system/system-menu",
                        meta: {
                            title: "菜单管理",
                            "icon": "dashboard",
                            "pAuthorities": [{
                                "permission": "*"
                            }]
                        }
                    },
                    {
                        path: "/system/dept",
                        name: "dept",
                        component: "system/system-dept",
                        meta: {
                            title: "部门管理",
                            "icon": "dashboard",
                            "pAuthorities": [{
                                "permission": "*"
                            }]
                        }
                    },
                ]
            }
        ]
    },

]